/**
 * Copyright (c) 2017-2017 All Rights Reserved.
 */
package com.zbest.zpay.paycore.helper;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

import com.zbest.zpay.paycore.model.PaySubInfoStatus;

/**
 * 
 *
 * @author Administrator
 * @version $Id: PaySubInfoStatusManager.java, v 0.1 2017-4-16 下午2:02:28 Administrator Exp $
 */
@Service("paySubInfoStatusManager")
public class PaySubInfoStatusManager extends AbstractStatusManager implements InitializingBean {

    private Map<String, List<String>> statusMap = new HashMap<String, List<String>>();

    /** 
     * @see com.zbest.zpay.paycore.helper.AbstractStatusManager#getStatusMap()
     */
    @Override
    protected Map<String, List<String>> getStatusMap() {
        return statusMap;
    }

    /** 
     * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
     */
    @Override
    public void afterPropertiesSet() throws Exception {

        statusMap.put(PaySubInfoStatus.INITIAL.getCode(),
            Arrays.asList(new String[] { PaySubInfoStatus.PROCESS.getCode() }));

        statusMap.put(
            PaySubInfoStatus.PROCESS.getCode(),
            Arrays.asList(new String[] { PaySubInfoStatus.SUCCESS.getCode(),
                    PaySubInfoStatus.FAIL.getCode() }));

    }

}
